package com.yndsoft.jc.utils;

/**
 * 检查是否需要升级接口
 * Created by lixinli on 2017/10/20.
 */
public class VersionCheckInfo {
//      "updateFlag": {
//        "description": "是否需要更新",
//                "type": "boolean",
//                "required": false
//    },
//            "updateStrategy": {
//        "description": "更新策略，0 强制，1选择",
//                "type": "string",
//                "required": false
//    },
//            "latestVersion": {
//        "description": "版本信息",
//                "type": "object",
//                "$ref": "txls-version"
//    }
    private boolean updateFlag;
    private String updateStrategy;
    private VersionInfo latestVersion;

    public boolean isUpdateFlag() {
        return updateFlag;
    }

    public void setUpdateFlag(boolean updateFlag) {
        this.updateFlag = updateFlag;
    }
    public boolean isForceUpgrade(){
        return "0".equals(updateStrategy);
    }

    public String getUpdateStrategy() {
        return updateStrategy;
    }

    public void setUpdateStrategy(String updateStrategy) {
        this.updateStrategy = updateStrategy;
    }

    public VersionInfo getLatestVersion() {
        return latestVersion;
    }

    public void setLatestVersion(VersionInfo latestVersion) {
        this.latestVersion = latestVersion;
    }
}
